{{ $resourcesGet := .resourcesGet }}
{{ $targetPath := .targetPath }}

{{ with $resourcesGet }}
{{ else }}{{ errorf "Missing Required parameter name [ resourcesGet ]: %s" .Position }}
{{ end }}

{{ with $targetPath }}
    {{ else }}{{ errorf "Missing Required parameter name [ targetPath ]: %s" .Position }}
{{ end }}


{{ $sassOptions := dict "targetPath" $targetPath "outputStyle" "expanded" "precision" 6 }}

{{ $postcssOptions := dict "use" "autoprefixer" "noMap" true }}

{{ if hugo.IsProduction }}
    {{ $sassOptions = merge $sassOptions (dict "outputStyle" "compressed") }}
{{ end }}

{{ $style := resources.Get $resourcesGet | toCSS $sassOptions | postCSS $postcssOptions }}

{{ return ($style.Permalink | relURL) }}